import {deleted, get, post, put} from "@/api/client";

/**
 * 查询分页列表
 * @param  data
 */
export const getDepartPage = (data) => {
    return post(`/depart/page`, data);
};

/**
 * 修改Depart
 * @param  Depart
 */
export const updateDepart = (data) => {
    return post("/depart/updateById", data);
};

/**
 * 添加信息
 * @param  Depart
 */
export const addDepart = (data) => {
    return post("/depart/save", data);
};
/**
 * 删除
 * @param  id
 */
export const deletedDepart = (data) => {
    return deleted("/depart/delete", data);
};

/**
 * 根据id查询
 * @param  id
 */
export const getDepartById = (id) => {
    return get(`/depart/detail`, {id});
};

/**
 * 查询全部列表
 */
export const getDepartList = () => {
    return get(`/depart/list`);
};
